<!DOCTYPE html>
<html lang="en">
<head>
    <meta  http-equiv="content-type" content="text/html" charset="utf-8"/>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 加上defer属性：（代码已经加载进来了，延迟执行）。执行时机：当页面都加载完毕之后-->
    <script type="text/javascript" charset="UTF-8" src="test.js" defer="defer"></script>
    <script type="text/javascript">
        //window是浏览器对象，window可以省略
        window.alert("hello world+浏览器对象");

        //文档对象：document
        document.write("hello world+文档对象");

        //console
        console.info("hello world +console");

    </script>
</head>
<body>

</body>
</html>